import path from "path"

let Main = () => import("@/views/Main.vue")
export default [
    {
        path: "dashboard",
        name: "Dashboard",
        component: () => import("../views/Dashboard.vue"),
        meta: {
            title: "home",
            icon: 'icon-shouye'
        }
    },
    //运营管理
    {
        path: "operationmanage",
        name: "OperationManage",
        component: Main,
        meta: {
            title: "yunyin.yunyinmanage",
            icon: "icon-tongji"
        },
        children: [
            {
                path: "order",
                name: "OrderManage",
                component: () => import("../views/operatemanage/OrderManage.vue"),
                meta: {
                    title: "yunyin.ordermanage"
                }
            },
            {
                path: "comment",
                name: "CommentManage",
                component: () => import("../views/operatemanage/CommentManage.vue"),
                meta: {
                    title: "yunyin.commentmanage"
                }
            },
            {
                path: "freight",
                name: "FreightManage",
                component: () => import("../views/operatemanage/FreightManage.vue"),
                meta: {
                    title: "yunyin.yunfeimanage"
                }
            },
        ]
    },
    //商品管理
    {
        path: "goodsmanage",
        name: "GoodsManage",
        component: Main,
        meta: {
            title: "product.productmanage",
            icon: "icon-gouwuche"
        },
        children: [
            {
                path: "goodslist",
                name: "GoodsList",
                component: () => import("../views/goodsmanage/GoodsList.vue"),
                meta: {
                    title: "product.productlist"
                }
            },
            {
                path: "grouppurchase",
                name: "GroupPurchase",
                component: () => import("../views/goodsmanage/GroupPurchase.vue"),
                meta: {
                    title: "product.tuangoumanage"
                }
            },
            {
                path: "category",
                name: "CategoryManage",
                component: () => import("../views/goodsmanage/CategoryManage.vue"),
                meta: {
                    title: "product.categorymanage"
                }
            },
            {
                path: "editgoods/:id",
                name: "EditGoods",
                component: () => import("../views/commodity/EditCommodity.vue"),
                meta: {
                    title: "product.editgoods",
                    keepAlive: true
                }
            },
            {
                path: "addgoods",
                name: "AddGoods",
                component: () => import("../views/commodity/AddCommodity.vue"),
                meta: {
                    title: "product.addgoods",
                    keepAlive: true
                }
            },
        ]
    },
    //推广管理
    {
        path: "promotionmanage",
        name: "PromotionManage",
        component: Main,
        meta: {
            title: "tuiguan.tuiguanmanage",
            icon: "icon-tianchongxing"
        },
        children: [
            {
                path: "admanage",
                name: "AdManage",
                component: () => import("../views/promotionmanage/AdManage.vue"),
                meta: {
                    title: "tuiguan.guangaomanage"
                }
            },
            {
                path: "coupon",
                name: "CouponManage",
                component: () => import("../views/promotionmanage/CouponManage.vue"),
                meta: {
                    title: "tuiguan.youhuijuanmanage"
                }
            }
        ]
    },
    //用户管理
    {
        path: "usermanage",
        name: "UserManage",
        component: Main,
        meta: {
            title: "user.usermanage",
            icon: "icon-yonghu"
        },
        children: [
            {
                path: "member",
                name: "MemberManage",
                component: () => import("../views/usermanage/MemberManage.vue"),
                meta: {
                    title: "user.huiyuanmanage"
                }
            },
            {
                path: "address",
                name: "AddressManage",
                component: () => import("../views/usermanage/AddressManage.vue"),
                meta: {
                    title: "user.addrmanage"
                }
            }
        ]
    },
    //系统管理
    {
        path: "systemmanage",
        name: "SystemManage",
        component: Main,
        meta: {
            title: "system.systemmanage",
            icon: "icon-shezhi"
        },
        children: [
            {
                path: "systemconfiguration",
                name: "SystemConfiguration",
                component: () => import("../views/systemmanage/SystemConfiguration.vue"),
                meta: {
                    title: "system.settingmanage"
                }
            },
            {
                path: "administrators",
                name: "Administrators",
                component: () => import("../views/systemmanage/Administrators.vue"),
                meta: {
                    title: "system.adminusermanage"
                }
            },
            {
                path: "operationlog",
                name: "OperatioLog",
                component: () => import("../views/systemmanage/OperatioLog.vue"),
                meta: {
                    title: "system.operationlog"
                }
            },
            {
                path: "rolemanage",
                name: "RoleManage",
                component: () => import("../views/systemmanage/RoleManage.vue"),
                meta: {
                    title: "system.rolemanage"
                }
            }
        ]
    },
]